import request from '@/api/Axios/Axios'
import { BaseResponse } from '@/PageData/index'
import { UserRequest } from '@/PageData/Request'

// 封装 get post 请求
class REQ {
  get<T>(url: string, params: T): Promise<BaseResponse> {
    return request.get(url, { params });
  };
  post<T>(url: string, params: T): Promise<BaseResponse> {
    return request.post(url, params);
  }
}
// 实例化请求类
const Request = new REQ();



// 登录的商品
export class LoginProduct {
  // 管理员登录
  Login(params: UserRequest) {
    return Request.post('User/Logins', params);
  }
}

